<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>菜鸟教程</title>
  </head>
  <body>
    <script type="text/javascript">
      //基本数据类型举例
      var a = 23;
      var b = a;
      a++;
      console.log("基本数据类型，参数赋值的时候，传数值");
      console.log("a=" + a);
      console.log("b=" + b);

      // 引用数据类型举例
      console.log("引用数据类型：参数赋值的时候，传地址。");
      var obj1 = new Object();
      obj1.name = "zhangsan";

      var obj2 = obj1;

      obj1.name = "lisi";
      console.log("obj1.name=" + obj1.name);
      console.log("obj2.name=" + obj2.name);
    </script>
  </body>
</html>
